package com.wj.tool.utils;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Scanner;

@Data
@NoArgsConstructor
public class Result {
    // 响应业务状态
    private Integer status;
    // 响应中的数据
    private Object data;

    // 响应消息
    private String msg;

    public Result(Integer status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    public static void main(String[] args) {
        System.out.println("你想知道多少个月有多少对兔子？");
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        System.out.println(n+"个月有"+getNum(n)+"对兔子");
    }

    public static int getNum(int x){
        if (x == 1 || x == 2){
            return 1;
        } else {
            return getNum(x-1)+ getNum(x-2);
        }
    }
}
